/**
 * Company
 * Copyright (C) 2004-2018 All Rights Reserved.
 */
package com.idefav.springdemo2.aop.annonations.services.impl;

import com.alibaba.fastjson.JSON;
import com.idefav.springdemo2.aop.annonations.beans.Person;
import com.idefav.springdemo2.aop.annonations.services.PersonService;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

/**
 * @author wuzishu
 * @version $Id PersonServiceImpl.java, v 0.1 2018-07-22 下午4:05 wuzishu Exp $$
 */
@Component("personService")
public class PersonServiceImpl implements PersonService {
    @Override
    public Person getPerson() {
        Person person=new Person();
        person.setName("idefav");
        System.out.println("getPerson:"+JSON.toJSONString(person));
        return person;
//        throw new RuntimeException("测试异常");
    }

    @Override
    public void setPerson(Person person) {
        System.out.println("setPerson:"+ JSON.toJSONString(person));
    }
}
